

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>lli - directly execute programs from LLVM bitcode &#8212; LLVM 9 documentation</title>
    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    <script src="../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="llvm-link - LLVM bitcode linker" href="llvm-link.html" />
    <link rel="prev" title="llc - LLVM static compiler" href="llc.html" />
<style type="text/css">
  table.right { float: right; margin-left: 20px; }
  table.right td { border: 1px solid #ccc; }
</style>

  </head><body>
<div class="logo">
  <a href="../index.html">
    <img src="../_static/logo.png"
         alt="LLVM Logo" width="250" height="88"/></a>
</div>

    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="llvm-link.html" title="llvm-link - LLVM bitcode linker"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="llc.html" title="llc - LLVM static compiler"
             accesskey="P">previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="../index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">LLVM Command Guide</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">lli - directly execute programs from LLVM bitcode</a></li> 
      </ul>
    </div>


    <div class="document">
      <div class="documentwrapper">
          <div class="body" role="main">
            
  <div class="section" id="lli-directly-execute-programs-from-llvm-bitcode">
<h1>lli - directly execute programs from LLVM bitcode<a class="headerlink" href="#lli-directly-execute-programs-from-llvm-bitcode" title="Permalink to this headline">¶</a></h1>
<div class="section" id="synopsis">
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">lli</strong> [<em>options</em>] [<em>filename</em>] [<em>program args</em>]</p>
</div>
<div class="section" id="description">
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">lli</strong> directly executes programs in LLVM bitcode format.  It takes a program
in LLVM bitcode format and executes it using a just-in-time compiler or an
interpreter.</p>
<p><strong class="program">lli</strong> is <em>not</em> an emulator. It will not execute IR of different architectures
and it can only interpret (or JIT-compile) for the host architecture.</p>
<p>The JIT compiler takes the same arguments as other tools, like <strong class="program">llc</strong>,
but they don’t necessarily work for the interpreter.</p>
<p>If <cite>filename</cite> is not specified, then <strong class="program">lli</strong> reads the LLVM bitcode for the
program from standard input.</p>
<p>The optional <em>args</em> specified on the command line are passed to the program as
arguments.</p>
</div>
<div class="section" id="general-options">
<h2>GENERAL OPTIONS<a class="headerlink" href="#general-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-lli-fake-argv0">
<code class="sig-name descname">-fake-argv0</code><code class="sig-prename descclassname">=executable</code><a class="headerlink" href="#cmdoption-lli-fake-argv0" title="Permalink to this definition">¶</a></dt>
<dd><p>Override the <code class="docutils literal notranslate"><span class="pre">argv[0]</span></code> value passed into the executing program.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-force-interpreter">
<code class="sig-name descname">-force-interpreter</code><code class="sig-prename descclassname">={false,true}</code><a class="headerlink" href="#cmdoption-lli-force-interpreter" title="Permalink to this definition">¶</a></dt>
<dd><p>If set to true, use the interpreter even if a just-in-time compiler is available
for this architecture. Defaults to false.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-help">
<code class="sig-name descname">-help</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a summary of command line options.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-load">
<code class="sig-name descname">-load</code><code class="sig-prename descclassname">=pluginfilename</code><a class="headerlink" href="#cmdoption-lli-load" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">lli</strong> to load the plugin (shared object) named <em>pluginfilename</em> and use
it for optimization.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-stats">
<code class="sig-name descname">-stats</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-stats" title="Permalink to this definition">¶</a></dt>
<dd><p>Print statistics from the code-generation passes. This is only meaningful for
the just-in-time compiler, at present.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-time-passes">
<code class="sig-name descname">-time-passes</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-time-passes" title="Permalink to this definition">¶</a></dt>
<dd><p>Record the amount of time needed for each code-generation pass and print it to
standard error.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-version">
<code class="sig-name descname">-version</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-version" title="Permalink to this definition">¶</a></dt>
<dd><p>Print out the version of <strong class="program">lli</strong> and exit without doing anything else.</p>
</dd></dl>

</div>
<div class="section" id="target-options">
<h2>TARGET OPTIONS<a class="headerlink" href="#target-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-lli-mtriple">
<code class="sig-name descname">-mtriple</code><code class="sig-prename descclassname">=target triple</code><a class="headerlink" href="#cmdoption-lli-mtriple" title="Permalink to this definition">¶</a></dt>
<dd><p>Override the target triple specified in the input bitcode file with the
specified string.  This may result in a crash if you pick an
architecture which is not compatible with the current system.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-march">
<code class="sig-name descname">-march</code><code class="sig-prename descclassname">=arch</code><a class="headerlink" href="#cmdoption-lli-march" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the architecture for which to generate assembly, overriding the target
encoded in the bitcode file.  See the output of <strong>llc -help</strong> for a list of
valid architectures.  By default this is inferred from the target triple or
autodetected to the current architecture.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-mcpu">
<code class="sig-name descname">-mcpu</code><code class="sig-prename descclassname">=cpuname</code><a class="headerlink" href="#cmdoption-lli-mcpu" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify a specific chip in the current architecture to generate code for.
By default this is inferred from the target triple and autodetected to
the current architecture.  For a list of available CPUs, use:
<strong>llvm-as &lt; /dev/null | llc -march=xyz -mcpu=help</strong></p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-mattr">
<code class="sig-name descname">-mattr</code><code class="sig-prename descclassname">=a1,+a2,-a3,...</code><a class="headerlink" href="#cmdoption-lli-mattr" title="Permalink to this definition">¶</a></dt>
<dd><p>Override or control specific attributes of the target, such as whether SIMD
operations are enabled or not.  The default set of attributes is set by the
current CPU.  For a list of available attributes, use:
<strong>llvm-as &lt; /dev/null | llc -march=xyz -mattr=help</strong></p>
</dd></dl>

</div>
<div class="section" id="floating-point-options">
<h2>FLOATING POINT OPTIONS<a class="headerlink" href="#floating-point-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-lli-disable-excess-fp-precision">
<code class="sig-name descname">-disable-excess-fp-precision</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-disable-excess-fp-precision" title="Permalink to this definition">¶</a></dt>
<dd><p>Disable optimizations that may increase floating point precision.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-enable-no-infs-fp-math">
<code class="sig-name descname">-enable-no-infs-fp-math</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-enable-no-infs-fp-math" title="Permalink to this definition">¶</a></dt>
<dd><p>Enable optimizations that assume no Inf values.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-enable-no-nans-fp-math">
<code class="sig-name descname">-enable-no-nans-fp-math</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-enable-no-nans-fp-math" title="Permalink to this definition">¶</a></dt>
<dd><p>Enable optimizations that assume no NAN values.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-enable-unsafe-fp-math">
<code class="sig-name descname">-enable-unsafe-fp-math</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-enable-unsafe-fp-math" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">lli</strong> to enable optimizations that may decrease floating point
precision.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-soft-float">
<code class="sig-name descname">-soft-float</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-soft-float" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">lli</strong> to generate software floating point library calls instead of
equivalent hardware instructions.</p>
</dd></dl>

</div>
<div class="section" id="code-generation-options">
<h2>CODE GENERATION OPTIONS<a class="headerlink" href="#code-generation-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-lli-code-model">
<code class="sig-name descname">-code-model</code><code class="sig-prename descclassname">=model</code><a class="headerlink" href="#cmdoption-lli-code-model" title="Permalink to this definition">¶</a></dt>
<dd><p>Choose the code model from:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>default: Target default code model
tiny: Tiny code model
small: Small code model
kernel: Kernel code model
medium: Medium code model
large: Large code model
</pre></div>
</div>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-disable-post-RA-scheduler">
<span id="cmdoption-lli-disable-post-ra-scheduler"></span><code class="sig-name descname">-disable-post-RA-scheduler</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-disable-post-RA-scheduler" title="Permalink to this definition">¶</a></dt>
<dd><p>Disable scheduling after register allocation.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-disable-spill-fusing">
<code class="sig-name descname">-disable-spill-fusing</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-disable-spill-fusing" title="Permalink to this definition">¶</a></dt>
<dd><p>Disable fusing of spill code into instructions.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-jit-enable-eh">
<code class="sig-name descname">-jit-enable-eh</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-jit-enable-eh" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception handling should be enabled in the just-in-time compiler.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-join-liveintervals">
<code class="sig-name descname">-join-liveintervals</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-join-liveintervals" title="Permalink to this definition">¶</a></dt>
<dd><p>Coalesce copies (default=true).</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-nozero-initialized-in-bss">
<code class="sig-name descname">-nozero-initialized-in-bss</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-nozero-initialized-in-bss" title="Permalink to this definition">¶</a></dt>
<dd><p>Don’t place zero-initialized symbols into the BSS section.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-pre-RA-sched">
<span id="cmdoption-lli-pre-ra-sched"></span><code class="sig-name descname">-pre-RA-sched</code><code class="sig-prename descclassname">=scheduler</code><a class="headerlink" href="#cmdoption-lli-pre-RA-sched" title="Permalink to this definition">¶</a></dt>
<dd><p>Instruction schedulers available (before register allocation):</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=default: Best scheduler for the target
=none: No scheduling: breadth first sequencing
=simple: Simple two pass scheduling: minimize critical path and maximize processor utilization
=simple-noitin: Simple two pass scheduling: Same as simple except using generic latency
=list-burr: Bottom-up register reduction list scheduling
=list-tdrr: Top-down register reduction list scheduling
=list-td: Top-down list scheduler -print-machineinstrs - Print generated machine code
</pre></div>
</div>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-regalloc">
<code class="sig-name descname">-regalloc</code><code class="sig-prename descclassname">=allocator</code><a class="headerlink" href="#cmdoption-lli-regalloc" title="Permalink to this definition">¶</a></dt>
<dd><p>Register allocator to use (default=linearscan)</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=bigblock: Big-block register allocator
=linearscan: linear scan register allocator =local -   local register allocator
=simple: simple register allocator
</pre></div>
</div>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-relocation-model">
<code class="sig-name descname">-relocation-model</code><code class="sig-prename descclassname">=model</code><a class="headerlink" href="#cmdoption-lli-relocation-model" title="Permalink to this definition">¶</a></dt>
<dd><p>Choose relocation model from:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=default: Target default relocation model
=static: Non-relocatable code =pic -   Fully relocatable, position independent code
=dynamic-no-pic: Relocatable external references, non-relocatable code
</pre></div>
</div>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-spiller">
<code class="sig-name descname">-spiller</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-spiller" title="Permalink to this definition">¶</a></dt>
<dd><p>Spiller to use (default=local)</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=simple: simple spiller
=local: local spiller
</pre></div>
</div>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-lli-x86-asm-syntax">
<code class="sig-name descname">-x86-asm-syntax</code><code class="sig-prename descclassname">=syntax</code><a class="headerlink" href="#cmdoption-lli-x86-asm-syntax" title="Permalink to this definition">¶</a></dt>
<dd><p>Choose style of code to emit from X86 backend:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=att: Emit AT&amp;T-style assembly
=intel: Emit Intel-style assembly
</pre></div>
</div>
</dd></dl>

</div>
<div class="section" id="exit-status">
<h2>EXIT STATUS<a class="headerlink" href="#exit-status" title="Permalink to this headline">¶</a></h2>
<p>If <strong class="program">lli</strong> fails to load the program, it will exit with an exit code of 1.
Otherwise, it will return the exit code of the program it executes.</p>
</div>
<div class="section" id="see-also">
<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<p><em class="manpage"><a class="manpage reference external" href="https://llvm.org/docs/CommandGuide/llc.html">llc(1)</a></em></p>
</div>
</div>


            <div class="clearer"></div>
          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="llvm-link.html" title="llvm-link - LLVM bitcode linker"
             >next</a> |</li>
        <li class="right" >
          <a href="llc.html" title="llc - LLVM static compiler"
             >previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="../index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="index.html" >LLVM Command Guide</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">lli - directly execute programs from LLVM bitcode</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2003-2020, LLVM Project.
      Last updated on 2020-09-20.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
    </div>
  </body>
</html>